<div class="breadcrumb d-flex align-items-center px-3">
    <div class="btn btn-icon me-3 js-back" aria-label="返回" role="button" tabindex="0">
        <i class="iconfont icon-left-arrow"></i>
    </div>
    <h2 class="fs-18"><?= $user->username ?></h2>
</div>

<?php include '_user_edit.php' ?>

<div class="auth-form mx-auto p-4">
    <form id="auth-form" class="needs-validation" method="POST" autocomplete="off">
        <input type="hidden" name="csrf_token" value="<?= csrf_token() ?>">
        <div class="form-floating mb-3">
            <input type="password" class="form-control" name="oldPassword" id="oldPassword" placeholder="旧密码" autocomplete="off" required autofocus>
            <label for="oldPassword" id="oldPasswordHelp">旧密码</label>
        </div>
        <div class="form-floating mb-3">
            <input type="password" class="form-control" name="newPassword1" id="newPassword1" placeholder="新密码" required>
            <label for="newPassword1" id="newPassword1Help">新密码</label>
        </div>
        <div class="form-floating mb-3">
            <input type="password" class="form-control" name="newPassword2" id="newPassword2" placeholder="重复新密码" required>
            <label for="newPassword2" id="newPassword2Help">重复新密码</label>
        </div>
        <button type="button" id="submitButton" class="btn btn-secondary w-100 btn-lg rounded">修改密码</button>
        <!-- <button type="submit" class="btn btn-secondary w-100 auth-btn px-0">修改密码</button> -->
    </form>
</div>

<script>
    document.addEventListener("DOMContentLoaded", () => {
        // 当前链接添加 active
        highlightActiveLink("user");
        document.getElementById("my-reset").classList.add('active');
    });
</script>
